package com.ruoyi.flowable.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


@Api(tags = "工作流流程回调测试")
@RestController
@RequestMapping("/flowable/callback")
public class FlowCallbackController {

    @PostMapping(value = "/test")
    public AjaxResult testCallback(@RequestBody HashMap<String, String> variables) {
        System.out.println("回调成功");
        for (Map.Entry<String, String> entry : variables.entrySet()) {
            System.out.println("key:" + entry.getKey() + ",value:" + entry.getValue());
        }
        return AjaxResult.success();
    }
}
